﻿package mortal.game.view.mainUI.smallMap.view.typeIconDataParser
{
    import Message.BroadCast.*;
    import Message.Public.*;
    import extend.language.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.scene3D.layer3D.utils.*;
    import mortal.game.scene3D.player.entity.*;
    import mortal.game.utils.*;
    import mortal.game.view.mainUI.smallMap.view.data.*;

    public class SmallMap_EscortCopyParser extends Object implements ISMallMapTyperIconDataParser
    {
        public static var instance:SmallMap_EscortCopyParser = new SmallMap_EscortCopyParser;

        public function SmallMap_EscortCopyParser()
        {
            return;
        }// end function

        public function chooseIcon(param1:IEntity, param2:Array) : void
        {
            var _loc_6:SmallMapTypeIconData = null;
            var _loc_3:* = Cache.instance.role.entityInfo.entityId.id;
            var _loc_4:* = Cache.instance.role.entityInfo.force;
            var _loc_5:* = param1.entityInfo.entityInfo;
            if (EntityRelationUtil.isCar(_loc_5.entityId) && param1 is MonsterPlayer == false && _loc_4 == EForce._EForceForce1)
            {
                _loc_6 = new SmallMapTypeIconData();
                _loc_6.x = param1.x2d;
                _loc_6.y = param1.y2d;
                _loc_6.name = "";
                _loc_6.tips = "";
                _loc_6.iconName = ImagesConst.MapPoint_MyEscortCar;
                _loc_6.tips = Language.getString(21279);
                param2.push(_loc_6);
            }
            else if (_loc_4 == EForce._EForceForce2 && _loc_5.force == _loc_4 && param1 is PetPlayer == false && param1 is MonsterPlayer == false && EntityUtil.isSelf(_loc_5.entityId) == false)
            {
                _loc_6 = new SmallMapTypeIconData();
                _loc_6.x = param1.x2d;
                _loc_6.y = param1.y2d;
                _loc_6.name = "";
                _loc_6.tips = "";
                _loc_6.iconName = ImagesConst.MapPointFlagGreen;
                param2.push(_loc_6);
            }
            return;
        }// end function

    }
}
